// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3) 

package com.yoyo.lib.utilities;

import android.content.Context;
import android.content.res.Resources;
import android.util.DisplayMetrics;

public class PixelDpHelper
{

    public PixelDpHelper()
    {
    }

    public static int dip2px(Context context, float f)
    {
        return (int)(0.5F + f * context.getResources().getDisplayMetrics().density);
    }

    public static PixelDpHelper getInstance()
    {
        if(sInstance == null)
            sInstance = new PixelDpHelper();
        return sInstance;
    }

    public static int px2dip(Context context, float f)
    {
        return (int)(0.5F + f / context.getResources().getDisplayMetrics().density);
    }

    private static PixelDpHelper sInstance;
}
